package com.manolo.server.entity;

import java.nio.channels.SocketChannel;
import java.util.Map.Entry;

public class Partner {
	
	private Entry<SocketChannel, Player> playerOne;
	
	private Entry<SocketChannel, Player> playerTwo;
	
	private int partnerPoints;

	public Entry<SocketChannel, Player> getPlayerOne() {
		return playerOne;
	}

	public void setPlayerOne(Entry<SocketChannel, Player> playerOne) {
		this.playerOne = playerOne;
	}

	public Entry<SocketChannel, Player> getPlayerTwo() {
		return playerTwo;
	}

	public void setPlayerTwo(Entry<SocketChannel, Player> playerTwo) {
		this.playerTwo = playerTwo;
	}

	public int getPartnerPoints() {
		return partnerPoints;
	}

	public void setPartnerPoints(int partnerPoints) {
		this.partnerPoints = partnerPoints;
	}
	
	public boolean isPlayerInPartner(Player player)
	{
		if (player.equals(playerOne))
			return true;
		
		if (player.equals(playerTwo))
			return true;
		
		return false;
	}

}
